<template>
  <li v-if="divided" class="divider"></li>
  <li
    @click="emitCommand"
    :class="{
      'dropdown-bold-header': isHeader,
      disabled: disabled,
    }"
  >
    <slot></slot>
  </li>
</template>

<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
  name: "git-dropdown-item",
  props: {
    divided: {
      type: Boolean,
      default: false,
    },
    disabled: {
      type: Boolean,
      default: false,
    },
    isHeader: {
      type: Boolean,
      default: false,
    },
    command: {
      type: [String, Number, Object],
      default: 'none'
    },
  },
  setup(props, context) {
    const emitCommand = () => {
      context.emit("command", props.command);
      console.log(111, props.command)
    };
    return {
      emitCommand
    }
  },
});
</script>

<style lang="less"></style>
